package first;
import javax.servlet.*;
import java.io.IOException;
public class CharacterEncodingFilter implements Filter{
	@Override
	public void doFilter(ServletRequest servletRequest,ServletResponse servletResponse,FilterChain filterChain)throws IOException,ServletException{
		servletRequest.setCharacterEncoding("gb2312");
		filterChain.doFilter(servletRequest, servletResponse);
	}
	public void destroy() {
		
	}
	public void init(FilterConfig filterConfig)throws ServletException{
		
	}

}
